#include <iostream>
#include <cstdio>
#include <sys/types.h>
#include <signal.h>

using namespace std;

void Usage(const char* comm)
{
    cerr << "myKill fail!" << endl;
    cout << comm << " [-s signal |" << " -p pid]" << endl;
}

int main(int argc, char* argv[])
{
    //读取指令
    if(argc != 3)
    {
        Usage(argv[0]);
        exit(2);
    }

    int signal = atoi(argv[1] + 1);
    pid_t pid = atoi(argv[2]);

    kill(pid, signal);  //发出相应信号

    return 0;
}